.\" Copyright (C) 2006 International Business Machines Corporation
.\" Written by Anthony Bussani based on the Trusted Computing Group Software Stack Specification Version 1.2
.\"
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "Tspi_TPM_DAA_JoinInit" 3 "2006-09-04" "TSS 1.2"
.ce 1
TCG Software Stack Developer's Reference
.SH NAME
Tspi_TPM_DAA_JoinInit \- start the DAA Join process
.SH "SYNOPSIS"
.ad l
.hy 0
.nf
.B #include <tss/tss_typedef.h>
.B #include <tss/tss_structs.h>
.B #include <tss/tspi.h>
.sp
.BI "TSPICALL Tspi_TPM_DAA_JoinInit("
.BI "    TSS_HDAA                  " hDAA ","
.BI "    TSS_HTPM                  " hTPM ","
.BI "    TSS_HKEY                  " issuer_pk ","
.BI "    UINT32                    " issuer_authentication_PKLength ","
.BI "    TSS_HKEY*                 " issuer_authentication_PK ","
.BI "    UINT32                    " issuer_authentication_PK_signaturesLength ","
.BI "    BYTE**                    " issuer_authentication_PK_signatures ","
.BI "    UINT32*                   " capital_UprimeLength ","
.BI "    BYTE**                    " capital_Uprime ","
.BI "    TSS_DAA_IDENTITY_PROOF*   " identity_proof ","
.BI "    TSS_DAA_JOIN_SESSION*     " join_session
.BI ");"
.fi
.sp
.ad
.hy

.SH "DESCRIPTION"
.PP
\Tspi_TPM_DAA_JoinInit\fR
is the first out of 3 functions to execute in order to receive a DAA Credential. It
verifies the keys of the DAA Issuer and computes the TPM DAA public key.

.SH "PARAMETERS"
.PP
.SS hDAA
The \fIhDAA\fR parameter is used to specify the handle of the DAA object.
.SS hTPM
The \fIhTPM\fR parameter is the handle to the TPM object.
.SS issuer_pk
The \fIissuer_pk\fR parameter is the of the DAA Issuer public key.
.SS issuer_authentication_PKLength
The \fIissuer_authentication_PKLength\fR parameter is the length of the array of \fIissuerAuthPKs\fR.
.SS issuer_authentication_PK
The \fIissuer_authentication_PK\fR parameter is an array of RSA public keys (key chain) of
 the DAA Issuer used to authenticate the DAA Issuer public key. The size of the modulus must
 be TPM_DAA_SIZE_issuerModulus (256).
.SS issuer_authentication_PK_signaturesLength
The \fIissuer_authentication_PK_signaturesLength\fR parameter is the length of the array of
 issuerAuthPKSignatures. It is equal to issuerAuthPKsLength. The length of an element of the
 array is TPM_DAA_SIZE_issuerModulus (256).
.SS issuer_authentication_PK_signatures
The \fIissuer_authentication_PK_signatures\fR parameter is the array of byte arrays representing
 signatures on the modulus of the above key chain (issuerAuthPKs) in more details, the array has
 the following content (S(K[1],K[0]),S(K[2],N[1]),..S(K[ k ],K[n-1]), S(TPM_DAA_ISSUER,K[ k ])),
 where S(msg,privateKey) denotes the signature function with msg being signed by the privateKey.
.SS capital_UprimeLength
The \fIcapital_UprimeLength\fR parameter is the length of capitalUprime which is ln/8. ln is
defined as the size of the RSA modulus (2048).
.SS capital_Uprime
The \fIcapital_Uprime\fR parameter is U'.
.SS identityProof
The \fIidentityProof\fR parameter is a structure containing the endorsement, platform and conformance
 credential.
.SS joinSession
The \fIjoinSession\fR parameter is a structure containing DAA Join session information.

.SH "RETURN CODES"
.PP
\fBTspi_TPM_DAA_JoinInit\fR returns TSS_SUCCESS on success, otherwise one of the
following values is returned:
.TP
.SM TSS_E_INVALID_HANDLE
Either the DAA or the TPM handler is not valid.
.TP
.SM TSS_E_BAD_PARAMETER
.TP
.SM TSS_E_INTERNAL_ERROR
An internal SW error has been detected.
.TP
.SM TSS_E_DAA_ISSUER_KEY_ERROR

.SH "CONFORMING TO"

.PP
\fBTspi_TPM_DAA_JoinInit\fR conforms to the Trusted Computing Group
Software Specification version 1.2

.SH "SEE ALSO"

.PP
\fBTspi_TPM_DAA_JoinCreateDaaPubKey\fR(3)
\fBTspi_TPM_DAA_JoinStoreCredential\fR(3)

